--[[
贡献者:夕颜
时间:5.30
]]

--本算法来源于Max_G小六

function fragment(code)
 Tab = {}

  for value in string.gmatch(code,"\n(.-)\n") do
  table.insert(Tab,value)
 end
 
 function randomstr(len)
   local res=""
   for i=1,len do
     local choice=math.random(1,3)
     if choice==1 then
       res=res..string.char(math.random(65,90))
      elseif choice==2 then
       if i~=1 then
         res=res..string.char(math.random(48,57))
        else
         res=res..string.char(math.random(97,122))
       end
      elseif choice==3 then
       res=res..string.char(math.random(97,122))
     end
   end
   return res
 end

 function topart(filein)
   local sprits_1,sprits_2="",""
	for k,text in pairs(filein) do
     if text then
       if text~="" and load(text) and not text:find("return") then
         local tempt=randomstr(math.random(50,60))
         sprits_1=sprits_1.."\n"..tempt.."()\n"
         if math.random(1,2)==1 then
            sprits_2=sprits_2.."function "..tempt.."()\n"..text.."\nend\n"
          else
            sprits_2="function "..tempt.."()\n"..text.."\nend\n"..sprits_2
         end
        else
         sprits_1=sprits_1..text.."\n"
       end
     end
   end
   return sprits_2..sprits_1
 end
 return topart(Tab)
end